/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 小程序一键登录 获取手机号的code POST /wechatXCX/getPhoneByCode */
export async function wechatXcxGetPhoneByCodeUsingPost({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.wechatXcxGetPhoneByCodeUsingPostParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingstring>('/wechatXCX/getPhoneByCode', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取插件用户openpid code：插件用户标志凭证 code GET /wechatXCX/getPluginOpenpid */
export async function wechatXcxGetPluginOpenpidUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.wechatXcxGetPluginOpenpidUsingGetParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingstring>('/wechatXCX/getPluginOpenpid', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取用户openId GET /wechatXCX/getUsrOpenId */
export async function wechatXcxGetUsrOpenIdUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.wechatXcxGetUsrOpenIdUsingGetParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingstring>('/wechatXCX/getUsrOpenId', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 小程序登录/注册 GET /wechatXCX/jscode2session */
export async function wechatXcxJscode2SessionUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.wechatXcxJscode2SessionUsingGetParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingyoukexinxivo>('/wechatXCX/jscode2session', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 小程序静默登录 GET /wechatXCX/jscodeLogin */
export async function wechatXcxJscodeLoginUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.wechatXcxJscodeLoginUsingGetParams;
  options?: { [key: string]: unknown };
}) {
  return request<API.xiangyingyoukexinxivo>('/wechatXCX/jscodeLogin', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
